//
//  ViewController.m
//  Quartz2D
//
//  Created by Yinyin Zeng on 22/4/20.
//  Copyright © 2020 MaoYeYeDeJiangCuCha. All rights reserved.
//

#import "ViewController.h"
#import "DrawRectView.h"

@interface ViewController ()
@property(nonatomic,strong)DrawRectView *drawView;

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.drawView = [[DrawRectView alloc]initWithFrame:UIScreen.mainScreen.bounds];
    self.drawView.backgroundColor = [UIColor grayColor];
    
    [self.view addSubview:self.drawView];
    
    UISlider *slider = [[UISlider alloc]initWithFrame:CGRectMake(250, 600, 100, 20)];
    [slider addTarget:self action:@selector(progressChange:) forControlEvents:UIControlEventValueChanged];
    [self.drawView addSubview:slider];
    
}


-(void)progressChange:(UISlider*)sender{
    
    self.drawView.progressValue = sender.value;
}



@end
